package com.gwclh.personnel.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@EnableTransactionManagement
@MapperScan("com.gwclh.personnel.mapper")
public class MybatisPlusConfig {
    // 开启分页插件
    @Bean
    public PaginationInterceptor paginationInterceptor() {//mybatis-plus 拦截器 limit
        return  new PaginationInterceptor();
    }
}
